﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace XiTongJiCheng
{
    public partial class Form_ShowList : Form
    {
        public Form_ShowList()
        {
            InitializeComponent();
        }

        public delegate void MakeOneMessage(string s);
        public event MakeOneMessage CelarSelf; 

        public void BindData(DataOmega data)
        {

            listBox1.Items.Clear();
            for (int i = 0; i < data.Items.Count; i++)
            {
                if (data.Items[i].Type == "输入")
                {
                    listBox1.Items.Add(data.Items[i].Name);
                }
                else
                {
                    listBox1.Items.Add($"          {data.Items[i].Name}");
                }
                
            }
        }       

        private void Form_ShowList_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (CelarSelf != null)
            {
                CelarSelf("我要自爆了");
            }
        }
    }
}
